import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const GPMG: AppRouteRecordRaw = {
  path: '/survey',
  name: 'survey',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.survey',
    requiresAuth: true,
    icon: 'icon-list',
    order: 5,
  },
  children: [
    {
      path: 'search-table', // The midline path complies with SEO specifications
      name: 'SurveySearchTable',
      component: () => import('@/views/survey/search-table/index.vue'),
      meta: {
        locale: 'menu.survey.searchTable',
        requiresAuth: true,
        roles: ['admin', 'user'],
      },
    },
    {
      path: 'create-survey', // The midline path complies with SEO specifications
      name: 'CreateSurvey',
      component: () => import('@/views/survey/create-question/index.vue'),
      meta: {
        locale: '创建问卷',
        requiresAuth: true,
        roles: ['admin', 'user'],
      },
    },
    {
      path: 'preview-survey', // The midline path complies with SEO specifications
      name: 'PreviewSurvey',
      component: () => import('@/views/survey/search-table/priview.vue'),
      meta: {
        locale: '预览问卷',
        requiresAuth: true,
        roles: ['admin', 'user'],
      },
    },
    {
      path: 'choose-type', // The midline path complies with SEO specifications
      name: 'ChooseType',
      component: () => import('@/views/survey/choose-type/index.vue'),
      meta: {
        locale: '选择类型',
        requiresAuth: true,
        roles: ['admin', 'user'],
      },
    },
    // {
    //   path: 'card',
    //   name: 'Card',
    //   component: () => import('@/views/list/card/index.vue'),
    //   meta: {
    //     locale: 'menu.survey.cardList',
    //     requiresAuth: true,
    //     roles: ['*'],
    //   },
    // },
  ],
};

export default GPMG;
